home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / imglib2 / imgIDecoderObserver.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  197 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM imgIDecoderObserver.idl
  3.  */
  4.  
  5. #ifndef __gen_imgIDecoderObserver_h__
  6. #define __gen_imgIDecoderObserver_h__
  7.  
  8.  
  9. #ifndef __gen_imgIContainerObserver_h__
  10. #include "imgIContainerObserver.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class imgIRequest; /* forward declaration */
  18.  
  19. class imgIContainer; /* forward declaration */
  20.  
  21. class gfxIImageFrame; /* forward declaration */
  22.  
  23. #include "nsRect.h"
  24.  
  25. /* starting interface:    imgIDecoderObserver */
  26. #define IMGIDECODEROBSERVER_IID_STR "cce7152e-4395-4231-a781-c347c5446cc2"
  27.  
  28. #define IMGIDECODEROBSERVER_IID \
  29.   {0xcce7152e, 0x4395, 0x4231, \
  30.     { 0xa7, 0x81, 0xc3, 0x47, 0xc5, 0x44, 0x6c, 0xc2 }}
  31.  
  32. /**
  33.  * imgIDecoderObserver interface
  34.  *
  35.  * @author Stuart Parmenter <pavlov@netscape.com>
  36.  * @version 0.1
  37.  * @see imagelib2
  38.  */
  39. class NS_NO_VTABLE imgIDecoderObserver : public imgIContainerObserver {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(IMGIDECODEROBSERVER_IID)
  43.  
  44.   /**
  45.    * called as soon as the image begins getting decoded
  46.    */
  47.   /* void onStartDecode (in imgIRequest aRequest); */
  48.   NS_IMETHOD OnStartDecode(imgIRequest *aRequest) = 0;
  49.  
  50.   /**
  51.    * called once the image has been inited and therefore has a width and height
  52.    */
  53.   /* void onStartContainer (in imgIRequest aRequest, in imgIContainer aContainer); */
  54.   NS_IMETHOD OnStartContainer(imgIRequest *aRequest, imgIContainer *aContainer) = 0;
  55.  
  56.   /**
  57.    * called when each frame is created
  58.    */
  59.   /* void onStartFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame); */
  60.   NS_IMETHOD OnStartFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) = 0;
  61.  
  62.   /**
  63.    * called when some part of the frame has new data in it
  64.    */
  65.   /* [noscript] void onDataAvailable (in imgIRequest aRequest, in gfxIImageFrame aFrame, [const] in nsIntRect aRect); */
  66.   NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, gfxIImageFrame *aFrame, const nsIntRect * aRect) = 0;
  67.  
  68.   /**
  69.    * called when a frame is finished decoding
  70.    */
  71.   /* void onStopFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame); */
  72.   NS_IMETHOD OnStopFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) = 0;
  73.  
  74.   /**
  75.    * probably not needed.  called right before onStopDecode
  76.    */
  77.   /* void onStopContainer (in imgIRequest aRequest, in imgIContainer aContainer); */
  78.   NS_IMETHOD OnStopContainer(imgIRequest *aRequest, imgIContainer *aContainer) = 0;
  79.  
  80.   /**
  81.    * called when the decoder is dying off
  82.    */
  83.   /* void onStopDecode (in imgIRequest aRequest, in nsresult status, in wstring statusArg); */
  84.   NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg) = 0;
  85.  
  86. };
  87.  
  88. /* Use this macro when declaring classes that implement this interface. */
  89. #define NS_DECL_IMGIDECODEROBSERVER \
  90.   NS_IMETHOD OnStartDecode(imgIRequest *aRequest); \
  91.   NS_IMETHOD OnStartContainer(imgIRequest *aRequest, imgIContainer *aContainer); \
  92.   NS_IMETHOD OnStartFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame); \
  93.   NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, gfxIImageFrame *aFrame, const nsIntRect * aRect); \
  94.   NS_IMETHOD OnStopFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame); \
  95.   NS_IMETHOD OnStopContainer(imgIRequest *aRequest, imgIContainer *aContainer); \
  96.   NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg); 
  97.  
  98. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  99. #define NS_FORWARD_IMGIDECODEROBSERVER(_to) \
  100.   NS_IMETHOD OnStartDecode(imgIRequest *aRequest) { return _to OnStartDecode(aRequest); } \
  101.   NS_IMETHOD OnStartContainer(imgIRequest *aRequest, imgIContainer *aContainer) { return _to OnStartContainer(aRequest, aContainer); } \
  102.   NS_IMETHOD OnStartFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) { return _to OnStartFrame(aRequest, aFrame); } \
  103.   NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, gfxIImageFrame *aFrame, const nsIntRect * aRect) { return _to OnDataAvailable(aRequest, aFrame, aRect); } \
  104.   NS_IMETHOD OnStopFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) { return _to OnStopFrame(aRequest, aFrame); } \
  105.   NS_IMETHOD OnStopContainer(imgIRequest *aRequest, imgIContainer *aContainer) { return _to OnStopContainer(aRequest, aContainer); } \
  106.   NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg) { return _to OnStopDecode(aRequest, status, statusArg); } 
  107.  
  108. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  109. #define NS_FORWARD_SAFE_IMGIDECODEROBSERVER(_to) \
  110.   NS_IMETHOD OnStartDecode(imgIRequest *aRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartDecode(aRequest); } \
  111.   NS_IMETHOD OnStartContainer(imgIRequest *aRequest, imgIContainer *aContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartContainer(aRequest, aContainer); } \
  112.   NS_IMETHOD OnStartFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartFrame(aRequest, aFrame); } \
  113.   NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, gfxIImageFrame *aFrame, const nsIntRect * aRect) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDataAvailable(aRequest, aFrame, aRect); } \
  114.   NS_IMETHOD OnStopFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopFrame(aRequest, aFrame); } \
  115.   NS_IMETHOD OnStopContainer(imgIRequest *aRequest, imgIContainer *aContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopContainer(aRequest, aContainer); } \
  116.   NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopDecode(aRequest, status, statusArg); } 
  117.  
  118. #if 0
  119. /* Use the code below as a template for the implementation class for this interface. */
  120.  
  121. /* Header file */
  122. class _MYCLASS_ : public imgIDecoderObserver
  123. {
  124. public:
  125.   NS_DECL_ISUPPORTS
  126.   NS_DECL_IMGIDECODEROBSERVER
  127.  
  128.   _MYCLASS_();
  129.  
  130. private:
  131.   ~_MYCLASS_();
  132.  
  133. protected:
  134.   /* additional members */
  135. };
  136.  
  137. /* Implementation file */
  138. NS_IMPL_ISUPPORTS1(_MYCLASS_, imgIDecoderObserver)
  139.  
  140. _MYCLASS_::_MYCLASS_()
  141. {
  142.   /* member initializers and constructor code */
  143. }
  144.  
  145. _MYCLASS_::~_MYCLASS_()
  146. {
  147.   /* destructor code */
  148. }
  149.  
  150. /* void onStartDecode (in imgIRequest aRequest); */
  151. NS_IMETHODIMP _MYCLASS_::OnStartDecode(imgIRequest *aRequest)
  152. {
  153.     return NS_ERROR_NOT_IMPLEMENTED;
  154. }
  155.  
  156. /* void onStartContainer (in imgIRequest aRequest, in imgIContainer aContainer); */
  157. NS_IMETHODIMP _MYCLASS_::OnStartContainer(imgIRequest *aRequest, imgIContainer *aContainer)
  158. {
  159.     return NS_ERROR_NOT_IMPLEMENTED;
  160. }
  161.  
  162. /* void onStartFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame); */
  163. NS_IMETHODIMP _MYCLASS_::OnStartFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame)
  164. {
  165.     return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167.  
  168. /* [noscript] void onDataAvailable (in imgIRequest aRequest, in gfxIImageFrame aFrame, [const] in nsIntRect aRect); */
  169. NS_IMETHODIMP _MYCLASS_::OnDataAvailable(imgIRequest *aRequest, gfxIImageFrame *aFrame, const nsIntRect * aRect)
  170. {
  171.     return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173.  
  174. /* void onStopFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame); */
  175. NS_IMETHODIMP _MYCLASS_::OnStopFrame(imgIRequest *aRequest, gfxIImageFrame *aFrame)
  176. {
  177.     return NS_ERROR_NOT_IMPLEMENTED;
  178. }
  179.  
  180. /* void onStopContainer (in imgIRequest aRequest, in imgIContainer aContainer); */
  181. NS_IMETHODIMP _MYCLASS_::OnStopContainer(imgIRequest *aRequest, imgIContainer *aContainer)
  182. {
  183.     return NS_ERROR_NOT_IMPLEMENTED;
  184. }
  185.  
  186. /* void onStopDecode (in imgIRequest aRequest, in nsresult status, in wstring statusArg); */
  187. NS_IMETHODIMP _MYCLASS_::OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191.  
  192. /* End of implementation class template. */
  193. #endif
  194.  
  195.  
  196. #endif /* __gen_imgIDecoderObserver_h__ */
  197.